home *** CD-ROM | disk | FTP | other *** search
/ Trouble & Attitude 4 / Trouble and Attitude - Issue 04.iso / mac / DATA / MOVIES / COMMON.Cxt / 00073_Field_Movie Script Template.txt < prev    next >
Text File  |  1997-01-14  |  7KB  |  288 lines

  1. on enterFrame
  2.   pass
  3. end enterFrame
  4.  
  5. on exitFrame
  6.   pass
  7. end exitFrame
  8.  
  9. --  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  10.  
  11. on openControlPanel
  12.   
  13.   global gMusicOn, gCaptionOn
  14.   global gControlPanel
  15.   global gCurrentFunction
  16.   
  17.   set gCurrentFunction = "openControlPanel"
  18.   
  19.   if objectP(gControlPanel) then
  20.     forget gControlPanel
  21.   end if
  22.   
  23.   set controlPanelWidth to 336 -- can we get this value from the movie CONTROL.DIR?
  24.   set controlPanelHeight to 32 -- can we get this value from the movie CONTROL.DIR?
  25.   set horzOrigin to the stageLeft
  26.   set vertOrigin to the stageTop + 448 -- should calculate this <<<***>>>
  27.   set controlPanelRect to rect (horzOrigin, vertOrigin, horzOrigin + controlPanelWidth, ┬¼
  28.           vertOrigin + controlPanelHeight)
  29.   set gControlPanel to window "Control Panel"
  30.   set the rect of gControlPanel to controlPanelRect
  31.   set the fileName of  gControlPanel to "CONTROL.DIR"
  32.   set the titleVisible of gControlPanel to FALSE
  33.   
  34.   open gControlPanel
  35.   tell window "Control Panel"
  36.     setIconStatus "music", gMusicOn
  37.     setIconStatus "caption", gCaptionOn
  38.   end tell
  39.   
  40. end openControlPanel
  41.  
  42. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  43.  
  44. on closeControlPanel
  45.   
  46.   global gControlPanel
  47.   global gCurrentFunction
  48.   
  49.   set gCurrentFunction = "closeControlPanel"
  50.   
  51.   if objectP(gControlPanel) then
  52.     forget gControlPanel
  53.   end if
  54.   
  55. end closeControlPanel
  56.  
  57. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  58.  
  59. on toggleMusic
  60.   
  61.   global gCurrentFunction
  62.   global gMusicOn
  63.   
  64.   set gCurrentFunction = "toggleMusic"
  65.   if voidP(gMusicOn) then set gMusicOn = FALSE
  66.   if gMusicOn = FALSE then
  67.     set gMusicOn = TRUE
  68.   else
  69.     set gMusicOn = FALSE
  70.   end if
  71.   tell window "Control Panel"
  72.     setIconStatus "music", gMusicOn
  73.   end tell
  74.   playMusic
  75.   
  76.   
  77. end toggleMusic
  78.  
  79. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  80.  
  81.  
  82. on toggleSound
  83.   
  84.   global gCurrentFunction
  85.   
  86.   set gCurrentFunction = "toggleSound"
  87.   
  88. end toggleSound
  89.  
  90. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  91.  
  92. on printPage
  93.   
  94.   global gCurrentFunction
  95.   
  96.   set gCurrentFunction = "printPage"
  97.   
  98. end printPage
  99.  
  100. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  101.  
  102. on showHelp
  103.   
  104.   global gCurrentFunction
  105.   
  106.   set gCurrentFunction = "showHelp"
  107.   
  108. end showHelp
  109.  
  110. --  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  111.  
  112. on toggleCaption
  113.   
  114.   global gCaptionOn
  115.   global gCurrentFunction
  116.   
  117.   set gCurrentFunction = "toggleCaption"
  118.   if voidP(gCaptionOn) then set gCaptionOn = TRUE
  119.   if gCaptionOn = FALSE then
  120.     set gCaptionOn = TRUE
  121.   else
  122.     set gCaptionOn = FALSE
  123.   end if
  124.   tell window "Control Panel"
  125.     setIconStatus "caption", gCaptionOn
  126.   end tell
  127.   
  128. end toggleCaption
  129.  
  130. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  131.  
  132. on  millerTime
  133.   
  134.   global gCurrentFunction
  135.   
  136.   set gCurrentFunction = "millerTime"
  137.   
  138. end  millerTime
  139.  
  140. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  141.  
  142. on  goIndexPage
  143.   
  144.   global gCurrentFunction, gCurPath
  145.   
  146.   set gCurrentFunction = "goIndexPage"
  147.   go to frame "index" of movie gCurPath & "INDEX.DIR"
  148.   
  149. end  goIndexPage
  150.  
  151. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  152.  
  153. on showCredits
  154.   
  155.   global gCurrentFunction
  156.   
  157.   set gCurrentFunction = "showCredits"
  158.   
  159. end showCredits
  160.  
  161. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  162.  
  163. on showSubscribe
  164.   
  165.   global gCurrentFunction
  166.   
  167.   set gCurrentFunction = "showSubscribe"
  168.   
  169. end showSubscribe
  170.  
  171. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  172.  
  173. on goFirstPage
  174.   
  175.   global gCurrentFunction, gNavMode, gLastFrame, gLocalSound
  176.   
  177.   set gCurrentFunction = "goFirstPage"
  178.   if gNavMode = "chapter" then
  179.     set gLocalSound = FALSE
  180.     if soundBusy(1) then sound fadeOut 1, 90
  181.     if soundBusy(2) then sound fadeOut 2, 90
  182.     go to frame "intro"
  183.   else
  184.     beep
  185.   end if
  186.   
  187. end goFirstPage
  188.  
  189. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  190.  
  191. on goPreviousPage
  192.   
  193.   global gCurrentFunction, gCurPath, gNavMode, gLastFrame, gLocalSound
  194.   
  195.   set gCurrentFunction = "goPreviousPage"
  196.   set destination = 0
  197.   
  198.   case gNavMode of
  199.       
  200.     "intro":
  201.       beep
  202.     "chapter":
  203.       if gLastFrame = 0 then
  204.         alert "goPreviousPage: internal logic error, gLastFrame=0"
  205.       end if
  206.       if the frame = label("C1") then
  207.         set destination = -1
  208.       else if the frame = label("C2") then
  209.         set destination = -1
  210.       else if the frame = label("C3") then
  211.         set destination = -1
  212.       else if the frame = label("C4") then
  213.         set destination = -1
  214.       else if the frame = label("C5") then
  215.         set destination = -1
  216.       else
  217.         set destination = 1
  218.       end if
  219.       
  220.       case destination of
  221.           
  222.         1:
  223.           go to frame the frame - 1
  224.           
  225.         -1:
  226.           set gLocalSound = FALSE
  227.           if soundBusy(1) then sound fadeOut 1, 90
  228.           if soundBusy(2) then sound fadeOut 2, 90
  229.           set gNavMode = "intro"
  230.           go to frame "intro"
  231.           
  232.       end case
  233.       
  234.   end case
  235.   
  236. end goPreviousPage
  237.  
  238. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  239.  
  240. on goNextPage
  241.   
  242.   global gCurrentFunction, gNavMode, gLastFrame
  243.   
  244.   set gCurrentFunction = "goNextPage"
  245.   
  246.   case gNavMode of
  247.     "intro":
  248.       beep
  249.       --      alert "Your already at the beginning of this story, " ┬¼
  250.       --             & "try clicking one of the picture icons " ┬¼
  251.       --             & "or to return to the Table of Contents, click the 'Trouble' icon."
  252.     "chapter":
  253.       if gLastFrame = 0 then
  254.         alert "Internal Navigation Logic Error, how did we get here?"
  255.       end if
  256.       if the frame = gLastFrame then
  257.         if soundBusy(1) then sound fadeOut 1, 80
  258.         if soundBusy(2) then sound fadeOut 2, 80
  259.         go to frame "intro"
  260.       else
  261.         go to the frame + 1
  262.       end if
  263.   end case
  264.   
  265. end goNextPage
  266.  
  267. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  268.  
  269. on toggleMovieController 
  270.   
  271.   global gCurrentFunction 
  272.   set gCurrentFunction = "toggleMovieController" 
  273.   
  274. end toggleMovieController
  275.  
  276. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  277.  
  278. on playMusic
  279.   
  280.   global gCurrentFunction, gMusicOn
  281.   
  282.   if gMusicOn = TRUE then
  283.     set gCurrentFunction = "playMusic:Music is now ON"
  284.   else
  285.     set gCurrentFunction = "playMusic: Music is now OFF"
  286.   end if
  287.   
  288. end playMusic